
<%@ page language="java" contentType="text/html;charset=utf-8" pageEncoding="utf-8"%>
<!DOCTYPE HTML>
<html>

<head>
    <title>停车场编辑</title>
</head>
<body >
<div class="pd-20">
    <form action="<%=request.getContextPath()%>/back/fieldpark/doupdate.do" method="post" class="form form-horizontal" id="form-fieldPark-edit">
        <input type="hidden" name="uuid" value="${fieldParkInfo.uuid}">
        <div class="row cl">
            <label class="form-label col-2"><span class="c-red">*</span>业主名称：</label>
            <div class="formControls col-10">
                <input type="text" class="input-text" value="${fieldParkInfo.company}" placeholder="" dataType="*" dataType="不能为空" name="company">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-2">市备案号：</label>
            <div class="formControls col-2">
                <input type="text" class="input-text" value="${fieldParkInfo.icpshi}" placeholder=""  name="icpshi">
            </div>
            <label class="form-label col-2">区备案号：</label>
            <div class="formControls col-2">
                <input type="text" class="input-text" value="${fieldParkInfo.icpqu}" placeholder=""  name="icpqu">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-2">注册地址：</label>
            <div class="formControls col-2">
                <input type="text" class="input-text" value="${fieldParkInfo.registeraddress}" placeholder=""  name="registeraddress">
            </div>
            <label class="form-label col-2">场库地址：</label>
            <div class="formControls col-2">
                <input type="text" class="input-text" value="${fieldParkInfo.parkaddress}" placeholder=""  name="parkaddress">
            </div>
            <label class="form-label col-2">场库位置：</label>
            <div class="formControls col-2">
                <input type="text" class="input-text" value="${fieldParkInfo.location}" placeholder=""  name="location">
            </div>
        </div>

        <div class="row cl">
            <label class="form-label col-2"><span class="c-red">*</span>所属街道：</label>
            <div class="formControls col-6">
                <input type="text" class="input-text" value="${fieldParkInfo.townstreet}" placeholder=""  name="townstreet">
            </div>
            <label class="form-label col-2">地图：</label>
            <div class="formControls col-2">
                <button onClick="findLocalPoint()" class="btn btn-default radius" type="button">选择坐标</button>
            </div>
        </div>
        <div class="row cl" style="display:none;">
            <label class="form-label col-2">地图经度：</label>
            <div class="formControls col-2">
                <input type="text" class="input-text" value="${fieldParkInfo.lng}" placeholder="" id="locallng" name="lng" readonly>
            </div>
            <label class="form-label col-2">地图维度：</label>
            <div class="formControls col-2">
                <input type="text" class="input-text" value="${fieldParkInfo.lat}" placeholder="" id="locallat" name="lat" readonly>
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-2">经济性质：</label>
            <div class="formControls col-2">
                <input type="text" class="input-text" value="${fieldParkInfo.economictype}" placeholder=""  name="economictype">
            </div>
            <label class="form-label col-2">法人代表：</label>
            <div class="formControls col-2">
                <input type="text" class="input-text" value="${fieldParkInfo.legalrepresentative}" placeholder=""  name="legalrepresentative">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-2">场等级：</label>
            <div class="formControls col-2">
                <input type="text" class="input-text" value="${fieldParkInfo.fieldlevel}" placeholder=""  name="fieldlevel">
            </div>
            <label class="form-label col-2">库等级：</label>
            <div class="formControls col-2">
                <input type="text" class="input-text" value="${fieldParkInfo.storehouselevel}" placeholder=""  name="storehouselevel">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-2">收费说明：</label>
            <div class="formControls col-10">
                <input type="text" class="input-text" value="${fieldParkInfo.chargeremark}" placeholder=""  name="chargeremark">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-2">场停车位(个)：</label>
            <div class="formControls col-2">
                <input type="text" class="input-text" value="${fieldParkInfo.filedparknum}" placeholder=""  name="filedparknum">
            </div>
            <label class="form-label col-2">库停车位(个)：</label>
            <div class="formControls col-2">
                <input type="text" class="input-text" value="${fieldParkInfo.storehouseparknum}" placeholder=""  name="storehouseparknum">
            </div>
            <label class="form-label col-2">总计停车位(个)：</label>
            <div class="formControls col-2">
                <input type="text" class="input-text" value="${fieldParkInfo.totalparknum}" placeholder=""  name="totalparknum">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-2">场面积/㎡：</label>
            <div class="formControls col-2">
                <input type="text" class="input-text" value="${fieldParkInfo.fieldarea}" placeholder=""  name="fieldarea">
            </div>
            <label class="form-label col-2">库面积/㎡：</label>
            <div class="formControls col-2">
                <input type="text" class="input-text" value="${fieldParkInfo.storehousearea}" placeholder=""  name="storehousearea">
            </div>
            <label class="form-label col-2">总计面积/㎡：</label>
            <div class="formControls col-2">
                <input type="text" class="input-text" value="${fieldParkInfo.totalarea}" placeholder=""  name="totalarea">
            </div>
        </div>

        <div class="row cl">
            <label class="form-label col-2">联系人：</label>
            <div class="formControls col-2">
                <input type="text" class="input-text" value="${fieldParkInfo.contactpeople}" placeholder=""  name="contactpeople">
            </div>
            <label class="form-label col-2">联系电话：</label>
            <div class="formControls col-2">
                <input type="text" class="input-text" value="${fieldParkInfo.contactphone}" placeholder=""  name="contactphone">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-2">手机：</label>
            <div class="formControls col-2">
                <input type="text" class="input-text" value="${fieldParkInfo.mobile}" placeholder=""  name="mobile">
            </div>
            <label class="form-label col-2">传真：</label>
            <div class="formControls col-2">
                <input type="text" class="input-text" value="${fieldParkInfo.fax}" placeholder=""  name="fax">
            </div>
            <label class="form-label col-2">邮编：</label>
            <div class="formControls col-2">
                <input type="text" class="input-text" value="${fieldParkInfo.zipcode}" placeholder=""  name="zipcode">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-2">楼宇名：</label>
            <div class="formControls col-10">
                <input type="text" class="input-text" value="${fieldParkInfo.buildingname}" placeholder=""  name="buildingname">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-2">备注说明：</label>
            <div class="formControls col-10">
                <input type="text" class="input-text" value="${fieldParkInfo.remark}" placeholder=""  name="remark">
            </div>
        </div>
        <div class="row cl">
            <div class="col-10 col-offset-2">
                <button onClick="filepark_save();" class="btn btn-secondary radius" type="button"><i class="Hui-iconfont">&#xe632;</i> 保存</button>
                <button onClick="layer_close();" class="btn btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
            </div>
        </div>
    </form>
</div>
</body>
</html>
<%@include file="../../head-ui.jsp"%>
<script type="text/javascript">
    var form=null;
    $(function(){
        form=$("#form-fieldPark-edit").Validform({
            tiptype:3,
            callback:function(data){
                debugger;
                layer.closeAll("loading");
                if(data.status=="0"){
                    layer.alert('保存成功!', {
                        icon: 1,//2表示保存失败图标，1表示保存成功
                        closeBtn: false,
                        shadeClose: true,
                        title: "提示"
                    }, function (index) {
                        layer.close(index)
                    });
                }else{
                    layer.alert('更新失败!');
                }
            },
            ajaxPost:true,
            showAllError:true
        });
    })

    function filepark_save(){
        form.submitForm(false);
    }
    function findLocalPoint(){
        var lng=$("#locallng").val();
        var lat=$("#locallat").val();
        var myurl= "<%=request.getContextPath()%>/back/fieldpark/localmap.do?lng="+lng+"&lat="+lat;
//          layer_show('坐标选择',myurl,'500','510');
        layer.open({
            type: 2,
            title:"坐标选择(拖动红点选择位置)",
            area: ['500px', '510px']
            ,shade: 0,
            content:myurl,
//            btn: ['确定'],
            yes: function(index, layero){
//                debugger;
//                layer.close(index)
            },
            close:function(index){
//                alert(2)
            },
            cancel:function(index){
//                alert(3)
            }
        })
    }
</script>

